<template>
  <div>
    <FormPanel
      ref="from"
      :list="formList"
      :cols="1"
      @formChange="changeHandle"
      :isSubmitBtn="false"
      labelWidth="110" />
    <div class="dialogBottmView" >
      <el-button @click="closeDrawer(1)">关 闭</el-button>
      <el-button @click="closeDrawer(2)" type="primary">确 定</el-button>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'arbitration',
    data() {
      this.saveData=null;
      return{
        formList: this.createTopFilterList(),
      };
    },
    methods:{
      closeDrawer(type){
        if(type==1){
          this.$emit('close')
        }else{
          const base=this.$refs.from.SUBMIT_FORM();
          if(base){
            this.$emit('close',base)
          }
        }
      },
      createTopFilterList(){
        return[
          {
            type: 'TEXT_AREA',
            label: '结案描述',
            fieldName: 'completeRemark',
            placeholder: '',
            initialValue: '',
            rules: [
              {
                required: true,
                message: '必填',
                trigger: 'change'
              }
            ]
          },
          {
            type: 'UPLOAD_FILE',
            label: '上传文件',
            fieldName: 'wayFiles',
            placeholder: '上传文件...',
            initialValue: '',
            upload: {
              actionUrl: '/api/file/oss/upload',
              limit: 1,
              tipText: '（支持：PDF、RAR、JPG格式）'
            }
          }
        ]
      },
      changeHandle(val) {
        this.saveData=val;
      },
    }
  };
</script>

<style scoped>

</style>
